/*******************************************************************************
  Name: errno.h
  Copyright: Kieran Foot 2009
  Author: Kieran Foot
  Date: 12/06/09 13:26
  Description: Basic errno.h
*******************************************************************************/

#include <_ansi.h>

#ifndef __ERRNO_H__
#define __ERRNO_H__

_BEGIN_STD_C

extern unsigned errno;

// C99 Defined errors
#define EDOM                  1
#define ERANGE                2
#define EILSEQ                3

// Set if no error occurd
#define ERROR_NO_ERROR 0

// Set if a function is not implemented
#define ERROR_NOT_IMPLEMENTED 4

#define ERROR_DOMAIN          EDOM
#define ERROR_RANGE           ERANGE
#define ERROR_ILL_BYTE_SEQ    EILSEQ

#define ERROR_ACCESS_DENIED   5
#define ERROR_IO_ERROR        6

_END_STD_C

#endif
